<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>ReinovoLab</title></reinovo-lab></title>
		<link rel="icon" type="image/svg+xml" href="{{ url_for('static', filename='img/logo.svg') }}">
		<link rel="stylesheet" media="(min-width: 480px)" href="{{ url_for('static',filename='css/style.css') }}">
        <link rel="stylesheet" media="(max-width: 480px)" href="{{ url_for('static',filename='css/phone/style.css') }}">
		<link rel="stylesheet" media="(min-width: 480px)" href="{{ url_for('static',filename='css/toolbox_style.css') }}">
        <link rel="stylesheet" media="(max-width: 480px)" href="{{ url_for('static',filename='css/phone/toolbox_style.css') }}">
		<link rel="stylesheet" media="(min-width: 480px)" href="{{ url_for('static',filename='css/rei_style.css') }}">
        <link rel="stylesheet" media="(max-width: 480px)" href="{{ url_for('static',filename='css/phone/rei_style.css') }}">
		
		<script src="{{ url_for('static',filename='dist/three.min.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/ColladaLoader.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/roslib.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/ros3d.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/blockly.min.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/blockly_compressed.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/blocks_compressed.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/zh-hans.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/python_compressed.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/javascript_compressed.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/socket.io.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/jquery.min.js') }}"></script>
		<script src="{{ url_for('static',filename='dist/jquery-ui.min.js') }}"></script>
		<script src="{{ url_for('static',filename='js/storage.js') }}"></script>
		<script src="{{ url_for('static',filename='js/custon_category.js') }}"></script>	
    </head>
    <body>
        <div id="robot">
            <div class="App">
                <header class="App-header">
                    <div class="App-header-right">
                        <div class="App-logo">
                            <img src='static/img/logo.png' alt="logo">
                        </div>
                    </div>
                    <div class="App-header-right">
						<div class="App-blockly-header"></div>
						<a href="/">
							<div class="App-hearder-tab">首页</div>
						</a>
						<div class="App-hearder-tab" id="file-manager">文件</div>
                        <div class="App-language" id="lauguage-button">
                            <span class="App-language-img"></span>
                            <span class="text">简体中文</span>
                            <span class="App-lauguage-select"></span>
                        </div>
                    </div>
                </header>
                <div class="App-control">
                    <div class="App-blockly" id="blocklyDiv"></div>
                    <div class="App-blockly-robot">
						<div class="App-blockly-robot-view" id="ros-rviz-view">
							<div class="rei-confirmation-window" id="open-nav">
								<div class="rei-close-window-button"></div>
								<!-- <div class="rei-window-content">
									<label for="rosip">机器人ip地址：</label>
									<input type="text" id="rosip" name="rosip" value="192.168.8.1" required>
								</div> -->
								<!-- <div class="rei-window-content">
									<p>设置机器人IP地址，以连接机器人。</p>
								</div> -->
								<div class="rei-window-content">
									<label for="map-name">选择地图：</label>
									<!-- <input type="text" id="map-name" name="map-name" value="map" required> -->
									<select name="maplist" id="maplist" class="select">
									</select>
								</div>
								<div class="rei-window-content">
									<p>选择机器人导航的地图名称</p>
								</div>
								<div class="rei-window-content">
									<a href="/start_nav"></a>
									<button style="width: 120px;" id="ros_start_nav">确 定</button>
								</div>
							</div>
							<div class="App-blockly-robot-view-tool">
								<div class="App-blockly-robot-link" id="robot-tool">
									<div id="robot-state-lamp"></div>
								</div>
								<div class="App-blockly-robot-link" id="robot-run">
								</div>
								<div class="App-blockly-robot-link" id="robot-stop">
								</div>
								<div class="App-blockly-robot-link" id="App-blockly-log"></div>
								<div class="rei-confirmation-window" id="log-output">
									<div class="rei-close-window-button"></div>
									<div class="rei-window-content">
										<p>Copyright (C) 2024 shenzhen reinovo, Inc. All Rights Reserved </p>
									</div>
									<div class="rei-window-content">
										<div class="rei-window-output"></div>
									</div>
								</div>
								<div class="App-blockly-robot-link" id="robot-data-visual">
								</div>
								<div class="App-blockly-robot-link" id="App-blockly-toolbox"></div>
							</div>
							<div id="viewer_rviz">
								<div class="rei_viewer_loading" id="rviz-loading">
									<div class="line"></div>
								</div>
								<div class="rviz-joy-left" id="rviz-joy-left">
									<div class="rei-ros-joy">
										<div class="rei-ros-joy-axis"></div>
									</div>
								</div>
								<div class="rviz-joy-reight" id="rviz-joy-reight">
									<div class="rei-ros-joy">
										<div class="rei-ros-joy-axis"></div>
									</div>
								</div>
							</div>							
						</div>
						<div class="App-blockly-robot-controller" id="robot_controller">
							<div class="App-blockly-robot-tag" id="robot-tag">
								<div id="rei-equipment-selection">
								</div>
								<p>设备选择</p>
							</div>
							<div class="App-blockly-robot-tool" id="base-tool">
								<div class="App-blockly-robot-tool-nav"></div>
								<div class="App-blockly-robot-tool-tag-page" id="nav-goal-edit" title="编辑导航点">
									<div class="App-blockly-robot-tool-nav-goal">
										<button id="save-goal">保存当前点</button>
										<div class="rei-confirmation-window" id="save-goal-cfg">
											<div class="rei-close-window-button"></div>
											<div class="rei-window-content">
												<label for="goal-name">为导航点命名：</label>
												<input type="text" id="goal-name" name="goal-name" required>
											</div>
											<div class="rei-window-content">
												<p>导航点名称开头格式不能为数字和符号</p>
											</div>
											<div class="rei-window-content">
												<button style="width: 120px;" id="save-goal-ok" onclick="saveGoal()">确 定</button>
											</div>
										</div>
										<br>
										<div>
											<select name="Goallist" id="Goallist" class="select"></select>
											<br>
											<div>
												<button id="del-goal">删除导航点</button>
												<button id="nav-goal">导航到目标点</button>
											</div>

										</div>

									</div>
								</div>
								<div class="App-blockly-robot-tool-tag-page" id="key-mobility-control" title="控制开关">
									<div class="App-robot-control-move">
										<div class="control-swithch">
											<input class="mui-switch mui-switch-animbg" id="key-control" type="checkbox">
											<p>控制开关</p>
										</div>
										<div id="robot-key-control">
											<div class="keyboard">
												<div class="keyboard-key">Q
													<p>左移</p>
												</div>
												<div class="keyboard-key">W
													<p>前进</p>
												</div>
												<div class="keyboard-key">E
													<p>右移</p>
												</div>
												<div class="keyboard-key">A
													<p>左转</p>
												</div>
												<div class="keyboard-key">S
													<p>后退</p>
												</div>
												<div class="keyboard-key">D
													<p>右移</p>
												</div>
											</div>
										</div>
									</div>
								</div>
								<div class="App-blockly-robot-tool-tag-page" id="mouse-mobility-control" title="鼠标控制">
									<div class="robot-joy" id="robot-joy">
										<div class="robot-joy-left" id="bobac3-joy-left">
											<div class="rei-ros-joy">
												<div class="rei-ros-joy-axis"></div>
											</div>
										</div>
										<div class="robot-joy-reight" id="bobac3-joy-reight">
											<div class="rei-ros-joy">
												<div class="rei-ros-joy-axis"></div>
											</div>
										</div>
									</div>									
								</div>
							</div>
							<!-- <div class="App-blockly-robot-tool" id="bobac-tool">
								<div class="App-blockly-robot-tool-nav">
									<div class="App-blockly-robot-tool-tag">
										机器人数据
									</div>
									<div class="App-blockly-robot-tool-tag">
										相机数据
									</div>
								</div>
							</div> -->
							<div class="App-blockly-robot-tool" id="uarm-swift-pro">
								<div class="App-blockly-robot-tool-nav"></div>
								<div class="App-blockly-robot-tool-tag-page" id="arm-controller" title="手臂控制">
								
								</div>
							</div>
						</div>
                    </div>
                </div>
            </div>
        </div>
		<div class="loader-wrapper">
			<div class='loader'>
				<div class='article'>
				  <div class='page'></div>
				</div>
			</div>
			<div style="position: absolute; width: 100%;top: 60%;margin: 0 auto;">
				<div class="rei-window-content">
					<label for="rosip">设置机器人IP：</label>
					<input type="text" id="rosip" name="rosip" value="192.168.8.1" required>
				</div>
			</div>
        </div>
        <xml id="toolbox" style="display: none">
			<category name="逻辑">
			  <block type="controls_if"></block>
			  <block type="logic_compare">
				<field name="OP">EQ</field>
			  </block>
			  <block type="logic_operation">
				<field name="OP">AND</field>
			  </block>
			  <block type="logic_negate"></block>
			  <block type="logic_boolean">
				<field name="BOOL">TRUE</field>
			  </block>
			  <block type="logic_null"></block>
			  <block type="logic_ternary"></block>
			</category>
			<category name="循环">
			  <block type="controls_repeat_ext">
				<value name="TIMES">
				  <shadow type="math_number">
					<field name="NUM">10</field>
				  </shadow>
				</value>
			  </block>
			  <block type="controls_whileUntil">
				<field name="MODE">WHILE</field>
			  </block>
			  <block type="controls_for">
				<field name="VAR" id="vYR=_?,B*oOaDlL-gum=">i</field>
				<value name="FROM">
				  <shadow type="math_number">
					<field name="NUM">1</field>
				  </shadow>
				</value>
				<value name="TO">
				  <shadow type="math_number">
					<field name="NUM">10</field>
				  </shadow>
				</value>
				<value name="BY">
				  <shadow type="math_number">
					<field name="NUM">1</field>
				  </shadow>
				</value>
			  </block>
			  <block type="controls_forEach">
				<field name="VAR" id="4g:FZ)bY[;!q90R6t-.|">j</field>
			  </block>
			  <block type="controls_flow_statements">
				<field name="FLOW">BREAK</field>
			  </block>
			</category>
			<category name="数学">
			  <block type="math_number">
				<field name="NUM">0</field>
			  </block>
			  <block type="math_arithmetic">
				<field name="OP">ADD</field>
				<value name="A">
				  <shadow type="math_number">
					<field name="NUM">1</field>
				  </shadow>
				</value>
				<value name="B">
				  <shadow type="math_number">
					<field name="NUM">1</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_single">
				<field name="OP">ROOT</field>
				<value name="NUM">
				  <shadow type="math_number">
					<field name="NUM">9</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_trig">
				<field name="OP">SIN</field>
				<value name="NUM">
				  <shadow type="math_number">
					<field name="NUM">45</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_constant">
				<field name="CONSTANT">PI</field>
			  </block>
			  <block type="math_number_property">
				<mutation divisor_input="false"></mutation>
				<field name="PROPERTY">EVEN</field>
				<value name="NUMBER_TO_CHECK">
				  <shadow type="math_number">
					<field name="NUM">0</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_round">
				<field name="OP">ROUND</field>
				<value name="NUM">
				  <shadow type="math_number">
					<field name="NUM">3.1</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_on_list">
				<mutation op="SUM"></mutation>
				<field name="OP">SUM</field>
			  </block>
			  <block type="math_modulo">
				<value name="DIVIDEND">
				  <shadow type="math_number">
					<field name="NUM">64</field>
				  </shadow>
				</value>
				<value name="DIVISOR">
				  <shadow type="math_number">
					<field name="NUM">10</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_constrain">
				<value name="VALUE">
				  <shadow type="math_number">
					<field name="NUM">50</field>
				  </shadow>
				</value>
				<value name="LOW">
				  <shadow type="math_number">
					<field name="NUM">1</field>
				  </shadow>
				</value>
				<value name="HIGH">
				  <shadow type="math_number">
					<field name="NUM">100</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_random_int">
				<value name="FROM">
				  <shadow type="math_number">
					<field name="NUM">1</field>
				  </shadow>
				</value>
				<value name="TO">
				  <shadow type="math_number">
					<field name="NUM">100</field>
				  </shadow>
				</value>
			  </block>
			  <block type="math_random_float"></block>
			</category>
			<category name="文本">
			  <block type="text">
				<field name="TEXT"></field>
			  </block>
			  <block type="text_join">
				<mutation items="2"></mutation>
			  </block>
			  <block type="text_append">
				<field name="VAR" id="[gH8|uEq3vCZQ}o6wgD]">item</field>
				<value name="TEXT">
				  <shadow type="text">
					<field name="TEXT"></field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_length">
				<value name="VALUE">
				  <shadow type="text">
					<field name="TEXT">abc</field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_isEmpty">
				<value name="VALUE">
				  <shadow type="text">
					<field name="TEXT"></field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_indexOf">
				<field name="END">FIRST</field>
				<value name="VALUE">
				  <block type="variables_get">
					<field name="VAR" id="7:r@JyDv$+^yas@d-/#+">text</field>
				  </block>
				</value>
				<value name="FIND">
				  <shadow type="text">
					<field name="TEXT">abc</field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_charAt">
				<mutation at="true"></mutation>
				<field name="WHERE">FROM_START</field>
				<value name="VALUE">
				  <block type="variables_get">
					<field name="VAR" id="7:r@JyDv$+^yas@d-/#+">text</field>
				  </block>
				</value>
			  </block>
			  <block type="text_getSubstring">
				<mutation at1="true" at2="true"></mutation>
				<field name="WHERE1">FROM_START</field>
				<field name="WHERE2">FROM_START</field>
				<value name="STRING">
				  <block type="variables_get">
					<field name="VAR" id="7:r@JyDv$+^yas@d-/#+">text</field>
				  </block>
				</value>
			  </block>
			  <block type="text_changeCase">
				<field name="CASE">UPPERCASE</field>
				<value name="TEXT">
				  <shadow type="text">
					<field name="TEXT">abc</field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_trim">
				<field name="MODE">BOTH</field>
				<value name="TEXT">
				  <shadow type="text">
					<field name="TEXT">abc</field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_print">
				<value name="TEXT">
				  <shadow type="text">
					<field name="TEXT">abc</field>
				  </shadow>
				</value>
			  </block>
			  <block type="text_prompt_ext">
				<mutation type="TEXT"></mutation>
				<field name="TYPE">TEXT</field>
				<value name="TEXT">
				  <shadow type="text">
					<field name="TEXT">abc</field>
				  </shadow>
				</value>
			  </block>
			</category>
			<category name="列表">
			  <block type="lists_create_with">
				<mutation items="0"></mutation>
			  </block>
			  <block type="lists_create_with">
				<mutation items="3"></mutation>
			  </block>
			  <block type="lists_repeat">
				<value name="NUM">
				  <shadow type="math_number">
					<field name="NUM">5</field>
				  </shadow>
				</value>
			  </block>
			  <block type="lists_length"></block>
			  <block type="lists_isEmpty"></block>
			  <block type="lists_indexOf">
				<field name="END">FIRST</field>
				<value name="VALUE">
				  <block type="variables_get">
					<field name="VAR" id="Q{WS#e2V^K+oqGh9weLT">list</field>
				  </block>
				</value>
			  </block>
			  <block type="lists_getIndex">
				<mutation statement="false" at="true"></mutation>
				<field name="MODE">GET</field>
				<field name="WHERE">FROM_START</field>
				<value name="VALUE">
				  <block type="variables_get">
					<field name="VAR" id="Q{WS#e2V^K+oqGh9weLT">list</field>
				  </block>
				</value>
			  </block>
			  <block type="lists_setIndex">
				<mutation at="true"></mutation>
				<field name="MODE">SET</field>
				<field name="WHERE">FROM_START</field>
				<value name="LIST">
				  <block type="variables_get">
					<field name="VAR" id="Q{WS#e2V^K+oqGh9weLT">list</field>
				  </block>
				</value>
			  </block>
			  <block type="lists_getSublist">
				<mutation at1="true" at2="true"></mutation>
				<field name="WHERE1">FROM_START</field>
				<field name="WHERE2">FROM_START</field>
				<value name="LIST">
				  <block type="variables_get">
					<field name="VAR" id="Q{WS#e2V^K+oqGh9weLT">list</field>
				  </block>
				</value>
			  </block>
			  <block type="lists_split">
				<mutation mode="SPLIT"></mutation>
				<field name="MODE">SPLIT</field>
				<value name="DELIM">
				  <shadow type="text">
					<field name="TEXT">,</field>
				  </shadow>
				</value>
			  </block>
			  <block type="lists_sort">
				<field name="TYPE">NUMERIC</field>
				<field name="DIRECTION">1</field>
			  </block>
			</category>
			<category name="变量" custom="VARIABLE">
			</category>
			<category name="Functions" custom="PROCEDURE">
			</category>
			<category name="机器人控制">
				<block type="nav_goal"></block>
				<block type="relative_move"></block>
				<block type="track"></block>
			</category>
		</xml>
		<script src="{{ url_for('static',filename='js/rei_ros.js') }}"></script>
		<script src="{{ url_for('static',filename='js/reinovo-blockly.js') }}"></script>
		<script src="{{ url_for('static',filename='js/blockly_page.js') }}"></script>
		<script src="{{ url_for('static',filename='js/expansion_device.js') }}"></script>
		<script src="{{ url_for('static',filename='js/rei_blocks.js') }}"></script>
    </body>
</html>